package com.Hsu.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;

/**
 * @author Hsu琛君珩
 * @ClassName:LoggerController
 * @date 2023-12-14
 * @apiNote
 * @Version: v1.0
 */

@Slf4j
@RestController
public class LoggerController {
    //日志对象
    //private static Logger logger= LoggerFactory.getLogger(LoggerController.class);

    @PostConstruct
    public void print(){
        System.out.println("打印日志");
        log.info("--------------要输出日志的内容----------------");
        log.error("我是error日志");
        log.warn("我是warn日志");
        log.info("我是info日志");
        log.debug("我是debug日志");
        log.trace("我是trace日志");
    }
}
